<?php
/**
 * Created by PhpStorm.
 * User: lhl
 * Date: 2020/12/16
 * Time: 18:48
 * Features: 产品更新
 */

namespace app\adminapiv3\validate;


use think\Validate;

class ServerUpdateValidate extends Validate
{
    //验证规则
    protected $rule = [
        'ip|IP地址' => 'require|ip',
        'port|端口号' => 'require|integer|egt:0|elt:65536',
    ];

    //验证场景
    protected $scene = [
        //产品升级
        'upgrade' => ['ip','port'],
    ];

    //错误信息
    protected $message = [
        'ip.ip' => 'IP地址格式错误',
    ];

}